<template>
	<view class="content">
		<view class="ItemTitle">
			<view class="Title">查询项目: {{OBJ.type == 1 ? '车辆历史报告-事故版' : '车辆历史报告-维保版'}}</view>
			<view class="BlurStatus" v-if="OBJ.status == 1" style="color: red;">查询失败</view>
			<view class="BlurStatus" v-if="OBJ.status == 0">查询成功</view>
		</view>
		<view class="Item">
			<view class="key">查询时间</view>
			<view class="value">{{OBJ.createTime}}</view>
		</view>
		<view class="Item">
			<view class="key">订单编号</view>
			<view class="value">{{OBJ.orderSn}}</view>
		</view>
		<view class="Item" :class="OBJ.status == 1 ? '' :'ItemB'">
			<view class="key">车辆VIN码</view>
			<view class="value">{{OBJ.vin}}</view>
		</view>
		<view class="Item" v-if="OBJ.status == 1"
			style="font-weight: 400;font-size: 22rpx;color: #999999;margin-bottom: 0;padding-bottom: 40rpx;border-bottom: 1rpx solid #efefef;">
			*查询所付款项将于2小时内原路退回，如未收到请联系客服</view>
		<view class="ItemBottom">
			<view class="left">
				<view class="leftName">支付次数 </view>
				<view v-if="OBJ.status == 1" style="font-weight: 400;font-size: 28rpx;color: #666666;">已退回</view>
				<view class="leftPrice" v-else>1次</view>
			</view>
			<view class="right" v-if="OBJ.status == 0">
				<view class="rightText" @click="checkItem">查看报告</view>
				<uni-icons type="right" color="#999"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "orderItem",
		props: {
			OBJ: {
				type: Object,
				default: () => {
					return {}
				}
			}
		},
		data() {
			return {

			};
		},
		methods: {
			topage() {
				uni.navigateTo({
					url: '/pages/index/index'
				})
			},
			checkItem() {
				uni.navigateTo({
					url: `/pages/AccidentReport/AccidentReport?orderId=${this.OBJ.orderId}&type=${this.OBJ.type}&TIME=${this.OBJ.createTime}&vin=${this.OBJ.vin}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		padding: 30rpx;
		margin-bottom: 30rpx;
		border-radius: 16rpx;
		background-color: #fff;
		box-shadow: 0rpx 8rpx 24rpx 0rpx rgba(9, 30, 66, 0.1);

		.ItemTitle {
			display: flex;
			align-items: center;
			padding: 10rpx 6rpx 48rpx;
			justify-content: space-between;

			.Title {
				font-weight: 400;
				font-size: 30rpx;
				color: #000000;
			}

			.BlurStatus {
				font-weight: 400;
				font-size: 24rpx;
				color: #00A3E6;
			}

		}

		.Item {
			display: flex;
			align-items: center;
			margin-bottom: 20rpx;

			.key {
				width: 130rpx;
				color: #666666;
				font-weight: 400;
				font-size: 26rpx;
				margin-right: 40rpx;
			}

			.value {
				font-weight: 400;
				font-size: 26rpx;
				color: #666666;
			}
		}

		.ItemB {
			margin-bottom: 0;
			padding-bottom: 40rpx;
			border-bottom: 1rpx solid #efefef;
		}

		.ItemBottom {
			display: flex;
			padding-top: 30rpx;
			align-items: center;
			justify-content: space-between;

			.left {
				display: flex;
				align-items: center;

				.leftName {
					font-weight: 400;
					font-size: 28rpx;
					color: #333333;
					margin-right: 8rpx;
				}

				.leftPrice {
					font-weight: 400;
					font-size: 28rpx;
					color: #FF0000;
				}
			}

			.right {
				display: flex;
				align-items: center;
				font-weight: 400;
				font-size: 28rpx;
				color: #999999;
			}
		}
	}
</style>